'use strict';
// 客户经理视图模
var $recordBox;

// 客户经理视图模块初始化
function initView() {
    initValue();
}

function initValue() {
    $recordBox = $("#record_box");
}

// 创建公司记录
function createRecord(objects) {
    for (var i = 0, l = objects.length; i < l; i++) {
        var recordOne = objects[i];
        var oneHtml = `
            <div class="record_one">
                <div class="company_title">${recordOne.companyName}</div>
                <div class="weui-cell">                                 
                    <div class="weui-cell__bd bd_info">
                        <p><span>交易笔数: ${recordOne.transactionNum}</span></p>
                        <p><span>姓名:${recordOne.userName}</span><span>电话:${recordOne.phone}</span></p>
                    </div>
                    <div class="weui-cell__ft">
                        <p class="record_money">${recordOne.money}</p>
                        <p class="sm">交易金额(元)</p>
                    </div>
                </div>
            </div>
        `
        $recordBox.append(oneHtml);
    }

}

export{
    initView,
    createRecord
}